﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using ZSZ.Core.Entities;

namespace ZSZ.EntityFramework.ModelConfig
{
    class IdNameConfig:EntityTypeConfiguration<IdNameEntity>
    {

        public override void Map(EntityTypeBuilder<IdNameEntity> builder)
        {
            builder.ToTable("T_IdNames");
            builder.Property(p => p.Name).IsRequired().HasMaxLength(1024);
            builder.Property(p => p.TypeName).IsRequired().HasMaxLength(1024);
        }
    }
}
